import { createApp } from 'vue'
//这里注意引入的App.vue文件路径，确保文件成功被引进来
import App from '../App.vue'
 
import { createI18n } from 'vue-i18n'
import messages from './index'
 
 
const app = createApp(App)
 
const i18n = createI18n({
  legacy: false, //处理报错Uncaught (in promise) SyntaxError: Not available in legacy mode (at message-compiler.esm-bundler.js:54:19)
  locale: localStorage.getItem('lang') || "zhCN", // 注意locale属性！
  messages
})
console.log(app)

export default i18n